fix: acceptance tests for secrets test output [PS-357]#6628
fix: acceptance tests for secrets test output [PS-357]#6628alexandru-manea-snyk wants to merge 1 commit intomainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
97767d5 to
b04f5e4
Compare
This comment has been minimized.
This comment has been minimized.
b04f5e4 to
624110a
Compare
This comment has been minimized.
This comment has been minimized.
624110a to
1352c55
Compare
This comment has been minimized.
This comment has been minimized.
test/jest/acceptance/snyk-secrets/snyk-secrets-test-user-journey.spec.ts
Outdated
Show resolved
Hide resolved
| const projectRoot = resolve(__dirname, '../../../..'); | ||
|
|
||
| const TEST_REPO_COMMIT = '366ae0080cc67973619584080fc85734ba2658b2'; | ||
| const TEST_REPO_URL = 'https://github.com/leaktk/fake-leaks'; |
There was a problem hiding this comment.
question/suggestions: Since this is an outside Snyk repository, did we consider vendoring it? We could also look to add it to the fixtures directory since we only scan a few of the available paths (but this might make gitleaks/GitGuardian unhappy, so we will need some ignores in place).
| // Ignore the target issues | ||
| for (const [index, issueId] of issuesToIgnore.entries()) { | ||
| const reason = `Test ignore reason metadata ${index}`; | ||
| await runSnykCLI( |
There was a problem hiding this comment.
question: Not sure if I missed this before, but I was expecting this to run the IAW flow, basically using the finding ID to do the ignores. I did also try it out and the .snyk file does not seem to work for ignoring the issues.
test/jest/acceptance/snyk-secrets/snyk-secrets-test-user-journey.spec.ts
Outdated
Show resolved
Hide resolved
1352c55 to
7f2d38b
Compare
PR Reviewer Guide 🔍
|
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
This PR adds acceptance tests to validate the SARIF and human-readable outputs of the
secrets testcommand. These tests are designed to codify our rendering expectations and serve as a shared contract for the CLI team to iterate against.Where should the reviewer start?
test/jest/acceptance/snyk-secrets/snyk-secrets-test-user-journey.spec.ts;How should this be manually tested?
Run the acceptance tests locally.
What's the product update that needs to be communicated to CLI users?
N/A
Risk assessment (Low | Medium | High)?
Low - extends test suite.
What are the relevant tickets?